<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>EnTech FPK: State Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">EnTech FPK
   &#160;<span id="projectnumber">1</span>
   </div>
   <div id="projectbrief">FRC Programming Kit by the EnTech 281 GreenVillains</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_state-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">State Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_state_8hpp_source.html">State.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for State:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_state.png" usemap="#State_map" alt=""/>
  <map id="State_map" name="State_map">
<area href="class_service.html" alt="Service" shape="rect" coords="0,0,202,24"/>
<area href="class_async_result_finish_state.html" alt="AsyncResultFinishState&lt; Result &gt;" shape="rect" coords="212,112,414,136"/>
<area href="class_async_result_start_state.html" alt="AsyncResultStartState&lt; Result &gt;" shape="rect" coords="212,168,414,192"/>
<area href="class_async_result_start_state.html" alt="AsyncResultStartState&lt; bool &gt;" shape="rect" coords="212,224,414,248"/>
<area href="class_async_status_finish_state.html" alt="AsyncStatusFinishState" shape="rect" coords="212,280,414,304"/>
<area href="class_async_status_start_state.html" alt="AsyncStatusStartState" shape="rect" coords="212,336,414,360"/>
<area href="class_chain_state.html" alt="ChainState" shape="rect" coords="212,392,414,416"/>
<area href="class_digital_input_check_state.html" alt="DigitalInputCheckState" shape="rect" coords="212,448,414,472"/>
<area href="class_final_state.html" alt="FinalState" shape="rect" coords="212,504,414,528"/>
<area href="class_instant_state.html" alt="InstantState" shape="rect" coords="212,560,414,584"/>
<area href="class_time_wait_state.html" alt="TimeWaitState" shape="rect" coords="212,616,414,640"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab91bb1dd5aa6260ab2a456581daf9ec2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#ab91bb1dd5aa6260ab2a456581daf9ec2">State</a> ()</td></tr>
<tr class="separator:ab91bb1dd5aa6260ab2a456581daf9ec2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afab438d92b90dc18d194dbd9c9c8bab3"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#afab438d92b90dc18d194dbd9c9c8bab3">~State</a> ()</td></tr>
<tr class="separator:afab438d92b90dc18d194dbd9c9c8bab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92b5cea13d0979711a1e9d364b101090"><td class="memItemLeft" align="right" valign="top">const std::map&lt; <a class="el" href="class_state_done_code.html">StateDoneCode</a>, <br class="typebreak"/>
<a class="el" href="class_state.html">State</a> * &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a92b5cea13d0979711a1e9d364b101090">GetTransitions</a> ()</td></tr>
<tr class="separator:a92b5cea13d0979711a1e9d364b101090"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7048d46adbba2594bac21ed28f5b688"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#ac7048d46adbba2594bac21ed28f5b688">AddTransition</a> (<a class="el" href="class_state.html">State</a> &amp;state)</td></tr>
<tr class="separator:ac7048d46adbba2594bac21ed28f5b688"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a386cc0be3fd5f6f0bdd6762fb7241440"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a386cc0be3fd5f6f0bdd6762fb7241440">AddTransition</a> (<a class="el" href="class_state_done_code.html">StateDoneCode</a> doneCode, <a class="el" href="class_state.html">State</a> &amp;state)</td></tr>
<tr class="separator:a386cc0be3fd5f6f0bdd6762fb7241440"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affc91f3b2042c17937831e72987c18c4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#affc91f3b2042c17937831e72987c18c4">RemoveTransition</a> (<a class="el" href="class_state_done_code.html">StateDoneCode</a> doneCode)</td></tr>
<tr class="separator:affc91f3b2042c17937831e72987c18c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9039982e4062751c0f8980e7f27a6843"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_state_done_code.html">StateDoneCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a9039982e4062751c0f8980e7f27a6843">GetDoneCode</a> ()</td></tr>
<tr class="separator:a9039982e4062751c0f8980e7f27a6843"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9826f43ac54827729f7c153b5d064597"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_state.html">State</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a9826f43ac54827729f7c153b5d064597">GetNextState</a> ()</td></tr>
<tr class="separator:a9826f43ac54827729f7c153b5d064597"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a3a160d410512e0f4529210aa8e1d9117"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a3a160d410512e0f4529210aa8e1d9117">HandleActivate</a> ()</td></tr>
<tr class="separator:a3a160d410512e0f4529210aa8e1d9117"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a877215e69abc4eaf66fdc0ae25296e6a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a877215e69abc4eaf66fdc0ae25296e6a">HandleDeactivate</a> ()</td></tr>
<tr class="separator:a877215e69abc4eaf66fdc0ae25296e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29e67195da90c4c44e0e8f0fbe938c7c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a29e67195da90c4c44e0e8f0fbe938c7c">HandlePeriodic</a> ()</td></tr>
<tr class="separator:a29e67195da90c4c44e0e8f0fbe938c7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fd757a8c9b92a4387c37657644498cf"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#a8fd757a8c9b92a4387c37657644498cf">HandleContinuous</a> ()</td></tr>
<tr class="separator:a8fd757a8c9b92a4387c37657644498cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc24d1a3d56c4d41fe85329e372f2146"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_state.html#afc24d1a3d56c4d41fe85329e372f2146">SetDoneCode</a> (<a class="el" href="class_state_done_code.html">StateDoneCode</a> doneCode)</td></tr>
<tr class="separator:afc24d1a3d56c4d41fe85329e372f2146"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec621ef40098f04ed24b3b6cd4164fc2"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aec621ef40098f04ed24b3b6cd4164fc2"><td class="memTemplItemLeft" align="right" valign="top">T &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_state.html#aec621ef40098f04ed24b3b6cd4164fc2">RequireControl</a> (T &amp;obj)</td></tr>
<tr class="separator:aec621ef40098f04ed24b3b6cd4164fc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:ad8c7806d4e98a1747e10c6ee871410b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad8c7806d4e98a1747e10c6ee871410b9"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>StateMachineService</b></td></tr>
<tr class="separator:ad8c7806d4e98a1747e10c6ee871410b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_methods_class_service"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_service')"><img src="closed.png" alt="-"/>&#160;Private Member Functions inherited from <a class="el" href="class_service.html">Service</a></td></tr>
<tr class="memitem:acc246c9f7ed3c51e2d91d10fe257513f inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#acc246c9f7ed3c51e2d91d10fe257513f">Service</a> ()</td></tr>
<tr class="separator:acc246c9f7ed3c51e2d91d10fe257513f inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6c3577b59652ac817d1d76aaccee904 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#af6c3577b59652ac817d1d76aaccee904">~Service</a> ()</td></tr>
<tr class="separator:af6c3577b59652ac817d1d76aaccee904 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6ba2b89e56e24074c03c61254ab7f14 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#ac6ba2b89e56e24074c03c61254ab7f14">GetIsStarted</a> () const </td></tr>
<tr class="separator:ac6ba2b89e56e24074c03c61254ab7f14 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab90e8000ec50c6c618226d27a562b151 inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#ab90e8000ec50c6c618226d27a562b151">Start</a> ()</td></tr>
<tr class="separator:ab90e8000ec50c6c618226d27a562b151 inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e52f5900502d844e424861b20fcd66b inherit pub_methods_class_service"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a5e52f5900502d844e424861b20fcd66b">Stop</a> ()</td></tr>
<tr class="separator:a5e52f5900502d844e424861b20fcd66b inherit pub_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39d6da19d7f51c1df904f482101557c2 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_service.html">Service</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a39d6da19d7f51c1df904f482101557c2">AddSubservice</a> (<a class="el" href="class_service.html">Service</a> &amp;service)</td></tr>
<tr class="separator:a39d6da19d7f51c1df904f482101557c2 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37c9e32f9044122d3a6d2ab40fc17c39 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a37c9e32f9044122d3a6d2ab40fc17c39">HandleStart</a> ()</td></tr>
<tr class="separator:a37c9e32f9044122d3a6d2ab40fc17c39 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38a2e9e764f74fe0da634d2252ee8744 inherit pro_methods_class_service"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_service.html#a38a2e9e764f74fe0da634d2252ee8744">HandleStop</a> ()</td></tr>
<tr class="separator:a38a2e9e764f74fe0da634d2252ee8744 inherit pro_methods_class_service"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_state.html">State</a> class is used by the StateMachineController.</p>
<p>The <a class="el" href="class_state.html">State</a> class is a special RobotController that acts as a state in the state machine in StateMachineController. States stores a transition map that maps a <a class="el" href="class_state_done_code.html">StateDoneCode</a> to another <a class="el" href="class_state.html">State</a>. When the state is done, it sets the "done code". When the done code is set, the state machine moves on to the <a class="el" href="class_state.html">State</a> specified by the transition map.</p>
<p>This class seems to work. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab91bb1dd5aa6260ab2a456581daf9ec2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">State::State </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Constructor for <a class="el" href="class_state.html">State</a>. </p>

</div>
</div>
<a class="anchor" id="afab438d92b90dc18d194dbd9c9c8bab3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">State::~State </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Desturctor for <a class="el" href="class_state.html">State</a>. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ac7048d46adbba2594bac21ed28f5b688"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void State::AddTransition </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_state.html">State</a> &amp;&#160;</td>
          <td class="paramname"><em>state</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a transition that specifies which state to transition if the state finishes successfully.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">state</td><td>The <a class="el" href="class_state.html">State</a> to transition to. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a386cc0be3fd5f6f0bdd6762fb7241440"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void State::AddTransition </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_state_done_code.html">StateDoneCode</a>&#160;</td>
          <td class="paramname"><em>doneCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_state.html">State</a> &amp;&#160;</td>
          <td class="paramname"><em>state</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Adds a transition that specifies which state to transition if the state finishes with the specified DoneCode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doneCode</td><td>The DoneCode for the transition. </td></tr>
    <tr><td class="paramname">state</td><td>The <a class="el" href="class_state.html">State</a> to transition to. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9039982e4062751c0f8980e7f27a6843"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_state_done_code.html">StateDoneCode</a> State::GetDoneCode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets the <a class="el" href="class_state.html">State</a>'s <a class="el" href="class_state_done_code.html">StateDoneCode</a>.</p>
<p>If the <a class="el" href="class_state.html">State</a> is not done, it returns StateDoneCode::GetNotDoneCode().</p>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="class_state_done_code.html">StateDoneCode</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a9826f43ac54827729f7c153b5d064597"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_state.html">State</a> &amp; State::GetNextState </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets the next <a class="el" href="class_state.html">State</a>.</p>
<p>If the <a class="el" href="class_state.html">State</a> is not done, it returns itself.</p>
<dl class="section return"><dt>Returns</dt><dd>The next <a class="el" href="class_state.html">State</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a92b5cea13d0979711a1e9d364b101090"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const map&lt; <a class="el" href="class_state_done_code.html">StateDoneCode</a>, <a class="el" href="class_state.html">State</a> * &gt; &amp; State::GetTransitions </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the transitions map that maps a done code to a state.</p>
<dl class="section return"><dt>Returns</dt><dd>The transition map that maps a done code to a state. </dd></dl>

</div>
</div>
<a class="anchor" id="a3a160d410512e0f4529210aa8e1d9117"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void State::HandleActivate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Runs when the state is first run. </p>

<p>Reimplemented in <a class="el" href="class_mecanum_drive_subsystem_1_1_drive_start_state.html#a84daeab03132061b1b7acbc58d2ca2a8">MecanumDriveSubsystem::DriveStartState</a>, <a class="el" href="class_chain_state.html#a3be88e1f294b5f958a69a17eea7cc941">ChainState</a>, <a class="el" href="class_instant_state.html#a054dbdbc513552eacab938c0245e22fa">InstantState</a>, <a class="el" href="class_digital_input_check_state.html#ab91a5c594a247e2544759560ed0f64cc">DigitalInputCheckState</a>, and <a class="el" href="class_time_wait_state.html#aa42ceb5a951505135ac8e88b2260c30f">TimeWaitState</a>.</p>

</div>
</div>
<a class="anchor" id="a8fd757a8c9b92a4387c37657644498cf"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void State::HandleContinuous </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Continuously runs if the state is not done yet. </p>

</div>
</div>
<a class="anchor" id="a877215e69abc4eaf66fdc0ae25296e6a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void State::HandleDeactivate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Runs when the state is stops. </p>

</div>
</div>
<a class="anchor" id="a29e67195da90c4c44e0e8f0fbe938c7c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void State::HandlePeriodic </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Periodicly runs if the state is not done yet. </p>

<p>Reimplemented from <a class="el" href="class_service.html#a9604d04295202019e9a15f8c93bb31c6">Service</a>.</p>

<p>Reimplemented in <a class="el" href="class_async_result_finish_state.html#a9c327aa447e197c8f6e3b50150d46162">AsyncResultFinishState&lt; Result &gt;</a>, <a class="el" href="class_async_status_finish_state.html#a21f727ef7e4c1e5f284febf8f649f19a">AsyncStatusFinishState</a>, and <a class="el" href="class_time_wait_state.html#a67589e93acff3c395470f3fb4ad43e57">TimeWaitState</a>.</p>

</div>
</div>
<a class="anchor" id="affc91f3b2042c17937831e72987c18c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void State::RemoveTransition </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_state_done_code.html">StateDoneCode</a>&#160;</td>
          <td class="paramname"><em>doneCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Removes the transition with the specified <a class="el" href="class_state_done_code.html">StateDoneCode</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doneCode</td><td>The DoneCode of the transition. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aec621ef40098f04ed24b3b6cd4164fc2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">T&amp; State::RequireControl </td>
          <td>(</td>
          <td class="paramtype">T &amp;&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Add required control lock on an object (such as a <a class="el" href="class_robot_subsystem.html">RobotSubsystem</a>).</p>
<p>The lock is only acquired when the subscriber/service/operation is running. This prevents two unrelated subscribers from using the same object at the same time. For more information on using locking, see our <a class="el" href="class_thread.html">Thread</a> Safety Manuel that does not exist yet. :P</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>The object to be locked.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The obj parameter. </dd></dl>

</div>
</div>
<a class="anchor" id="afc24d1a3d56c4d41fe85329e372f2146"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void State::SetDoneCode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_state_done_code.html">StateDoneCode</a>&#160;</td>
          <td class="paramname"><em>doneCode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Sets the <a class="el" href="class_state.html">State</a>'s <a class="el" href="class_state_done_code.html">StateDoneCode</a>, thereby finishing the <a class="el" href="class_state.html">State</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">doneCode</td><td>The <a class="el" href="class_state_done_code.html">StateDoneCode</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>C:/Users/Sam/Projects/FRC/Libraries/Fpk/Entech-Fpk-Subscribers/Entech-Fpk/<a class="el" href="_state_8hpp_source.html">State.hpp</a></li>
<li>C:/Users/Sam/Projects/FRC/Libraries/Fpk/Entech-Fpk-Subscribers/Entech-Fpk/State.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Aug 12 2013 16:46:51 for EnTech FPK by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
